package cn.tuling.controller;

import cn.tuling.mapper.EmpMapper;
import cn.tuling.pojo.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/emp")
@RestController
public class EmpController {
    @Autowired
    private EmpMapper empMapper;

    @GetMapping
    public List<Emp> getAll() {
        return empMapper.selectAll();
    }
}
